Display Heritages in the Features Tab#22249
Conversation
| level: null, | ||
| feat: actor.heritage, | ||
| children: this.#getNestedSlots(actor.heritage), | ||
| } as never); |
There was a problem hiding this comment.
avoid casting to never. There's gotta be another way.
There was a problem hiding this comment.
Thanks, fixed and will keep in mind for the future
| @@ -247,6 +247,9 @@ class CharacterFeats<TActor extends CharacterPF2e> extends Collection<string, Fe | |||
| if (granter?.isOfType("feat") && granter.grants.includes(feat) && isNested) { | |||
There was a problem hiding this comment.
What is the practicality of including the heritage in granter.grants? It looks like grants in FeatPF2e is FeatPF2e | HeritagePF2e, so doing granter?.isOfType("feat", "heritage") && granter.grants.includes(feat) && isNested should be more terse
There was a problem hiding this comment.
I tried that, but Heritage doesn't have .grants, so the check fails and granted items show in bonus feats as duplicates, unfortunately
iDantar
left a comment
There was a problem hiding this comment.
Thanks again for the review, finally got back to PC and addressed it - would you be able to take another look please?
| @@ -247,6 +247,9 @@ class CharacterFeats<TActor extends CharacterPF2e> extends Collection<string, Fe | |||
| if (granter?.isOfType("feat") && granter.grants.includes(feat) && isNested) { | |||
There was a problem hiding this comment.
I tried that, but Heritage doesn't have .grants, so the check fails and granted items show in bonus feats as duplicates, unfortunately
| level: null, | ||
| feat: actor.heritage, | ||
| children: this.#getNestedSlots(actor.heritage), | ||
| } as never); |
There was a problem hiding this comment.
Thanks, fixed and will keep in mind for the future
Closes #22235
Supersedes #22233
Inserts the heritage in Ancestry Features list and renders it's nested feats, if any.

Some examples: